/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.wxrobot.dao;

import com.jeesite.common.dao.CrudDao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.modules.wxrobot.entity.TaskActivity;
import org.apache.ibatis.annotations.Param;

/**
 * 任务宝活动DAO接口
 * @author sam
 * @version 2018-08-08
 */
@MyBatisDao
public interface TaskActivityDao extends CrudDao<TaskActivity> {
    TaskActivity getByRobotWeixin(TaskActivity taskActivity);
    /**
     * 更新活动状态及机器人海报
     * @param taskActivity
     * @return
     */
    int updateStatusAndRobotPoster(TaskActivity taskActivity);
    /**
     * 下线机器人
     * @param robotWeixinUserName
     * @return
     */
    int offlineRobot(@Param("robotWeixinUserName") String robotWeixinUserName);

    /**
     * 更新运行中活动的机器人微信用户名，活动状态改为运行中
     * @param activityId
     * @param robotWeixinUserName
     * @return
     */
    int onlineActivityRobot(@Param("activityId") String activityId, @Param("robotWeixinUserName") String robotWeixinUserName);
}